package br.cnpq.webflowah.adaptation;

import java.util.List;

import br.cnpq.webflowah.beans.Operacao;
import br.ufrn.opencopi.graph.GraphPath;
import br.ufrn.opencopi.graph.Vertex;

/**
 * This class is used in the adaptation process to calculate which the best plan to substitute the actual plan
 * @author fredlopes
 *
 */
public class PlanAdaptationPriority {

	GraphPath graphPath;
	//final priority rating of a plan
	double priority;
	//absolute service quality
	double absoluteServiceQuality;
	//absolute adaptation quality
	double absoluteAdaptationQuality;
	//coincidence point selected between this new graphpath and actual graphpath
	private Vertex coincidencePoint;

	public PlanAdaptationPriority() {
		this.graphPath = null;
		this.priority = 0;
	}

	public PlanAdaptationPriority(GraphPath graphPath, double priority) {
		this.graphPath = graphPath;
		this.priority = priority;
	}

	public PlanAdaptationPriority(GraphPath graphPath) {
		this.graphPath = graphPath;
		this.priority = 0;
	}


	public double getPriority() {
		return priority;
	}

	public void setPriority(double priority) {
		this.priority = priority;
	}

	public double getAbsoluteAdaptationQuality() {
		return absoluteAdaptationQuality;
	}

	public void setAbsoluteAdaptationQuality(double absoluteAdaptationQuality) {
		this.absoluteAdaptationQuality = absoluteAdaptationQuality;
	}

	public double getAbsoluteServiceQuality() {
		return absoluteServiceQuality;
	}

	public void setAbsoluteServiceQuality(double absoluteServiceQuality) {
		this.absoluteServiceQuality = absoluteServiceQuality;
	}

	public GraphPath getGraphPath() {
		return graphPath;
	}

	public void setGraphPath(GraphPath graphPath) {
		this.graphPath = graphPath;
	}

	public Vertex getCoincidencePoint() {
		return coincidencePoint;
	}

	public void setCoincidencePoint(Vertex coincidencePoint) {
		this.coincidencePoint = coincidencePoint;
	}

	public String toString(){
		return "PlanAdaptationPriority: coincidencePoint="+getCoincidencePoint()+"; absoluteAdaptationQuality="+absoluteAdaptationQuality
		+"; absoluteServiceQuality"+absoluteServiceQuality+"; priority="+priority+"; graphPath.totring()="+graphPath.toString();
	}

}
